package com.easy;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by Lxk on 2019/5/12.
 */
public class Solution217 {

    public boolean containsDuplicate(int[] nums) {
        Set<Integer> set = new HashSet<Integer>();
        for(int num : nums){
            if(!set.add(num)){
                return true;
            }
        }
        return false;
    }

}
